Conversation
…er on datasheet The Flujo total row on the vanguard technical datasheet (FUENTES DE LUZ section) was rendered via get_format_lang_decimal, which preserves all non-trailing-zero decimals — so a raw value of 3516.4125 was shown as "3.516,4125 lm", confusing the technical department and end customers. Per Albert Orteu (Lighting Projects), the spec is "sense cap decimal, números naturals" — Flujo total must always render as a natural integer, with the unit preserved. Extend _get_color_temperature_flux_values with an as_integer kwarg that coerces the value with int(round(...)) before handing it off to the existing get_format_lang_decimal helper (which returns "%g" for integer-valued numbers, matching how nominal_flux already renders integer values in this module). Storage is untouched and all other flux/wattage/color-consistency fields keep their prior formatting.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 16.0 #97 +/- ##
==========================================
- Coverage 43.57% 43.56% -0.02%
==========================================
Files 283 283
Lines 8128 8130 +2
Branches 1569 1570 +1
==========================================
Hits 3542 3542
- Misses 4491 4493 +2
Partials 95 95 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Flujo totalrow on the Vanguard technical datasheet (FUENTES DE LUZsection) rendered the rawtotal_fluxvalue throughget_format_lang_decimal, which preserves every non-trailing-zero decimal. A value of3516.4125was shown as3.516,4125 lm, confusing Novolux's technical department and their customers._get_color_temperature_flux_valueswith anas_integer=Falsekwarg that coerces the value withround(...)before handing it off to the existingget_format_lang_decimalhelper (which uses%gfor integer-valued numbers, matching hownominal_fluxalready renders integer values in this module). Storage and all other datasheet fields (nominal flux, wattage, color consistency, etc.) untouched.Test plan
lighting_reporting_vanguard_productwith--stop-after-init— loads clean989A-L0106B-01(Vanguard / Español) viaIMPRIMIR FICHA TÉCNICA→ Odoo wizard:Flujo total (2x) 239,39lmFlujo total (2x) 239lmFlujo nominal (2x) 200lmunchanged, full CSS/paperformat identicaltotal_fluxis already integer (282.0,152.0,4320.0) — output unchangedpre-commit run -apasses cleanCloses task #2564.